<template>
  <div class="search">
    <Input v-for="input in searchData.searchColumns"  :key="input.id" v-model="searchData.searchValue[input.key]" :placeholder="input.label"  style="width: 113px ;margin-right:10px" />
    <Button type="primary" @click="handleSearch">搜索</Button>
  </div>
</template>

<script>
export default {
  name: "tableSearch",
  data() {
    return {
    };
  },
  props: {
    searchData:{
      searchValue:Object,
      searchColumns:Array,
      default: () => []
    },
  },
  components: {
  },
  computed: {},
  watch: {},
  mounted() {
  },
  methods: {
    // 搜索
    handleSearch() {
      let search = this.searchData.searchColumns.map(item => {
         return item.value;
      });
      this.$emit("handleSearch", search);
    }
  }
};
</script>

<style scoped>
  .search{
    display: inline-block;
    margin: 10px 0;
    text-align: right;
  };
</style>
